From: Cosimo Cecchi Date: Mon, 18 Feb 2013 06:25:54 +0000 (-0500) Subject: overviewControls: update slide in translations from pageEmpty X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4790 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ccb81919f79f9f684234deb8f6b1fcdaae3e7965;p=gnome-shell.git overviewControls: update slide in translations from pageEmpty Now that we unified animation times, move in controls together with the new view. https://bugzilla.gnome.org/show_bug.cgi?id=694064 --- diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js index f96502029..3bbeb97c9 100644 --- a/js/ui/overviewControls.js +++ b/js/ui/overviewControls.js @@ -133,12 +133,12 @@ const SlidingControl = new Lang.Class({ return visibleWidth; }, - _updateTranslation: function(slidingIn) { + _updateTranslation: function() { let translationStart = 0; let translationEnd = 0; let translation = this._getTranslation(); - if (slidingIn) { + if (this.visible) { translationStart = translation; } else { translationEnd = translation; @@ -171,14 +171,13 @@ const SlidingControl = new Lang.Class({ }, slideIn: function() { - this._updateTranslation(true); this.visible = true; - // we will update slideX from pageEmpty + // we will update slideX and the translation from pageEmpty }, slideOut: function() { this.visible = false; - this._updateTranslation(false); + this._updateTranslation(); // we will update slideX from pageEmpty }, @@ -188,6 +187,7 @@ const SlidingControl = new Lang.Class({ // the next page, since slideIn or slideOut might have been called, // changing the visiblity this.layout.slideX = this.getSlide(); + this._updateTranslation(); } });